1. Field
The present invention relates generally to computing devices having embedded controllers with limited power resources, and more specifically, to conserving power in such devices when they experience a fault condition due to a software glitch.
2. Related Art
It is important in a computing device with embedded controllers to ensure that software errors do not cause the device to become unresponsive, and/or require human intervention to correct a fault condition. A common mechanism used to address this problem is a watchdog timer, which is a fail-safe mechanism that intervenes if a system stops functioning. In other words, if a software application “crashes” or “hangs,” the watchdog timer will expire, and the entire system will be reset automatically. By resetting the device, it is possible to restart the software application that may have malfunctioned and bring the computing device back to a normal mode of operation in which it is responsive.
A watchdog timer is usually implemented as part of a microcontroller (embedded controller) that can cause a processor to reset when it judges that the microcontroller has hung, or is no longer executing the correct sequence of code. In one common implementation, a counter is set to a certain count-value and is periodically decremented by hardware i.e., counts down towards zero. It is then the responsibility of one or more software applications to reset the count-value to its original value often enough to ensure that it never reaches zero. If it does reach zero, it is assumed that the software has failed in some manner and the microcontroller is reset. There are various terms used to refer to restarting the timer: strobing, petting, kicking or updating the timer. The watchdog timer is meant to minimize the effect of software errors and should only cause the embedded controller to become unresponsive for a brief period.
One drawback with this approach is that if a particular embedded software application is badly out-of-order, it may enter a state in which the system is continually reset by the watchdog timer. In the context of computing devices with limited sources of power, such as Radio Frequency Identification (RFID) tags, this may cause a significant power drain. For example, if the computing device crashes in a high-power state prior to the software malfunction being detected and the system is continually reset, its battery may be depleted rapidly. Unless the software malfunction is detected and remedied by a human before the battery is depleted, the RFID tag or a similar computing device will exhaust reserve power and it will no longer function.